<%-- 
    Document   : logincheck
    Created on : 2014/2/26, 上午 11:12:40
    Author     : Gjun
--%>

<%@page import="java.util.ArrayList"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%
        ArrayList<comm.comm> rsList=(ArrayList)session.getAttribute("rsList");
        String user=request.getParameter("user");
        String paseword=request.getParameter("paseword");
        String kk =request.getParameter("kk");
        String kktrue=request.getParameter("kktrue");
        String rand = (String)session.getAttribute("rand");
        String input = request.getParameter("kk");
    %>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
    </head>
    <body>
        <%
        
                if(rand.equals(input)){
                    session.setAttribute("user", user);
                    out.print("<font size='5' >登入成功</font><br><font size='3' >兩秒後自動換頁</font><br>"); 
                    if((rsList==null)||rsList.size()==0)
                    {
                        out.print("<meta http-equiv='refresh' content='2;url=http://10.10.3.14:8084/web4/daocy.jsp' />");
                    }else{
                    out.print("<meta http-equiv='refresh' content='2;url=http://10.10.3.14:8084/web4/endmay.jsp' />");
                }}
        else{
                    out.print("<font size='5' >認證碼輸入錯誤</font><br>");
                    out.print("<meta http-equiv='refresh' content='2;url=http://10.10.3.14:8084/web4/login.jsp' />");
        }
        %>
    </body>
</html>
